import { Node, UITransform } from "cc"

const createUINode = (name: string = "") => {
  const node = new Node(name)
  const transfrom = node.addComponent(UITransform)
  transfrom.setAnchorPoint(0, 1)
  return node
}
const randomByRange = (start: number, end: number) => {
  const num = start + Math.random() * (end - start)
  return Math.floor(num)
}

export { createUINode, randomByRange }
